Efficient support of dynamic inheritance for class- and prototype-based languages
نویسندگان
چکیده
Dynamically typed languages are becoming increasingly popular for different software development scenarios where runtime adaptability is important. Therefore, existing class-based platforms such as Java and .NET have been gradually incorporating dynamic features to support the execution of these languages. The implementations of dynamic languages on these platforms commonly generate an extra layer of software over the virtual machine, which reproduces the reflective prototype-based object model provided by most dynamic languages. Simulating this model frequently involves a runtime performance penalty, and makes the interoperation between classand prototype-based languages difficult. Instead of simulating the reflective model of dynamic languages, our approach has been to extend the object-model of an efficient class-based virtual machine with prototype-based semantics, so that it can directly support both kinds of languages. Consequently, we obtain the runtime performance improvement of using the virtual machine JIT compiler, while a direct interoperation between languages compiled to our platform is also possible. In this paper, we formalize dynamic inheritance for both classand prototype-based languages, and implement it as an extension of an efficient virtual machine that performs JIT compilation. We also present an extensive evaluation of the runtime performance and memory consumption of the programming language implementations that provide dynamic inheritance, including ours.
منابع مشابه
Implementation of Dynamic Delegation in Strongly Typed Inheritance-Based Systems
In this paper we introduce an object-oriented model that integrates class-based inheritance and object-based, dynamic delegation in the framework of a static type system and we show that implementation techniques for strongly typed, inheritance-based languages can be adapted to handle dynamic delegation efficiently. Our model and implementation scheme show how today's "production programming" s...
متن کاملInteroperability in a Scripted World: Putting Inheritance & Prototypes Together
Scripting languages are used to quickly and easily develop or extend programs. Frequently, these scripted programs are combined with libraries and other programs from conventional languages to build more complex applications. Bridging the gap between different languages requires manual data conversions and dynamic checks which can introduce subtle errors. Language and compiler support for inter...
متن کاملEfficient virtual machine support of runtime structural reflection
Increasing trends towards adaptive, distributed, generative and pervasive software have made object-oriented dynamically typed languages become increasingly popular. These languages offer dynamic software evolution by means of reflection, facilitating the development of dynamic systems. Unfortunately, this dynamism commonly imposes a runtime performance penalty. In this paper, we describe how t...
متن کاملA Layered Calculus for Encapsulated Object Modification Extended
Current prototype-based languages suffer from an inherent conflict between inheritance and encapsulation. Whereas encapsulation tries to hide implementation details from the user, inheritance depends at least to some extent on exposing these implementation details. We propose a powerful calculus with dynamic object modification which does not have this conflict. This calculus constitutes a form...
متن کاملA Layered Calculus for Encapsulated Object Modification
Current prototype-based languages suffer from an inherent conflict between inheritance and encapsulation. Whereas encapsulation tries to hide implementation details from the user, inheritance depends at least to some extent on exposing these implementation details. We propose a powerful calculus with dynamic object modification which solves this conflict. This calculus constitutes a formal foun...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Journal of Systems and Software
دوره 86 شماره
صفحات -
تاریخ انتشار 2013